package model;

public class Matricula {

	private long id;
	private Long codAluno;
	private Long codTurma;
	
	public Matricula(){
		super();
	}
	
	public Matricula(long codAluno, long codTurma){
		this();
		this.codAluno = codAluno;
		this.codTurma = codTurma;		
	}

	public Long getCodAluno() {
		return codAluno;
	}

	public void setCodAluno(Long codAluno) {
		this.codAluno = codAluno;
	}

	public Long getCodTurma() {
		return codTurma;
	}

	public void setCodTurma(Long codTurma) {
		this.codTurma = codTurma;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + codAluno.longValue());
		result = (int) (prime * result + codTurma.longValue());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Matricula other = (Matricula) obj;
		if (codAluno != other.codAluno)
			return false;
		if (codTurma != other.codTurma)
			return false;
		return true;
	}
}
